﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta  content="e-mail=no" name="format-detection"/>
    <title>贷款中心</title>
    <!--    __STATIC__/admin/js/jquery.min.js?v=2.1.4-->
    <link rel="stylesheet" href="__STATIC__/index/css/swiper.min_2.css">
    <link rel="stylesheet" href="__STATIC__/index/css/main_4.css">
    <link rel="stylesheet" href="__STATIC__/index/css/loanmkt_2.css">
    <script src="__STATIC__/index/js/jquery_2.js"></script>
    <script type="text/javascript" src="__STATIC__/index/js/agent_1.js"></script>
    <script type="text/javascript" src="__STATIC__/index/js/myslideup_1.js"></script>
    <link rel="stylesheet" href="__STATIC__/index/css/index_new_1.css">
    <style type="text/css">
        .swiper-container{ max-height:200px; }
        .swiper-wrapper{max-height:200px;}
        .swiper-slide{
            text-align: center;
            font-size: 18px;
            background: #fff;

            /* Center slide text vertically */
            display: -webkit-box;
            display: -ms-flexbox;
            display: -webkit-flex;
            display: flex;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            -webkit-justify-content: center;
            justify-content: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            -webkit-align-items: center;
            align-items: center;
            max-height: 200px;  overflow: hidden;
        }
        .swiper-slide img{ width:100%; height:200px; display:block; }
        .agenthh-foot a{text-align: -webkit-center;}
    </style>
</head>
<body class="bglightgray">

<div class="loan_tab">
    <ul>
        <!--<a class="J_menuItem" href="{:url('AppIndex/lists',array('type'=>1))}">-->
        <li class="on"><a href="javascript:;">首页</a></li>
        <li ><a href="{:url('DaiKuan/index')}">贷款</a></li>
        <li ><a href="{:url('BanKa/index')}">办卡</a></li>
    </ul>
</div>
<div class="loanindex_frame">

    <div class="loanindex_frame">
        <!-- 轮播 -->
        <div class="swiper-container loanindex-swiper">
            <div class="swiper-wrapper">
                {if !empty($banner)}
                {volist name="banner" id="banner"}
                <div class="swiper-slide"><a href="{$banner['url']}"><span><img src="__STATIC__/uploads/{$banner.img}" alt=""/></span></a></div>
                {/volist}
                {/if}
            </div>
            <div class="swiper-pagination swiper-pagination1"></div>
        </div>
    </div>
    <div class="loanindex_main">
        <div class="loanindex_shortcut">
            <ul>
                {volist name="list" id="vo"}
                <li>
                    <a href="{$vo['url']}">
                        <p><img src="__STATIC__/uploads/{$vo.img}" /></p>
                        <p>{$vo['title']}</p>
                    </a>
                </li>
                {/volist}
            </ul>
        </div>
    </div>
    <div class="loan_recommend">

        <h1><span>智能推荐</span></h1>
        <div class="recommend_list">
            {volist name="list2" id="vo2"}
            <div class="recommend_main" data-productid="221" onclick="clickNum(this);">
                <a href="{$vo2['url']}">
                    <ul class="desc">
                        <li>
                            <span><img src="__STATIC__/uploads/{$vo2.img}"/></span>
                            <div>
                                <div class="flex1 w100">
                                    <h2>{$vo2['title']}</h2>

                                    <p><span></span><b><em>{$vo2['number']}</em>人已申请</b></p>
                                </div>
                                <h5>{$vo2['subtitle']}</h5>
                            </div>

                        </li>
                    </ul>




                    <ul class="rate_data">
                        <li>
                            <h1>{$vo2['quota']}</h1>
                            <p>最高额度（元）</p>
                        </li>
                        <li>
                            <h1>{$vo2['term']}</h1>
                            <p>贷款期限</p>
                        </li>
                        <li>
                            <h1>{$vo2['interest']}</h1>
                            <p>日</p>
                        </li>
                        <li>
                            <button>申请</button>
                        </li>
                    </ul>
                </a>
            </div>
            {/volist}
        </div>
    </div>

</div>
<a class="more_hotcards"><img src="__STATIC__/index/picture/loading_1.png" />加载中</a>
<a class="no_hotcards" >没有更多咯~</a>

<script type="text/javascript" src=__STATIC__/index/js/swiper.min_2.js></script>
<script type="text/javascript">

    $(function(){
        var mySwiper = $('.swiper-container').swiper({
            loop: true,
            autoHeight: true,
            pagination: '.swiper-pagination1',
            paginationClickable: true,
            spaceBetween: 30,
            //其他设置
        });

    })
</script>

</script>
<script type="text/javascript">
    // 页面初始化
    $(document).ready(function(){
        var fr_T=($("div.loan_tab").height())+"px";
        $("div.loanindex_frame").css("margin-top",fr_T);
        $("img.ani_model").load(function(){
            img_load();
        });
        //下拉加载更多
        var loan_productH=($("div.loan_product").outerHeight())*10+"px";
        $("div.hotloan_list").css("height",loan_productH);

        var range = 0;             //距下边界长度/单位px
        var maxnum = 20;            //设置加载最多次数
        var num = 1;
        var totalheight = 0;                    //主体元素
        $(window).scroll(function(){
            var srollPos = $(window).scrollTop();    //滚动条距顶部距离(页面超出窗口的高度)
            //console.log("滚动条到顶部的垂直高度: "+$(document).scrollTop());
            //console.log("页面的文档高度 ："+$(document).height());
            //console.log('浏览器的高度：'+$(window).height());
            totalheight = parseFloat($(window).height()) + parseFloat(srollPos);
            if(($(document).height()-range) <= totalheight) {
                if($(".no_hotcards").css("display")!="block"){
                    $(".more_hotcards").css({"display":"block"});
                    var t=setTimeout(function(){
                        var list_H=$("div.hotloan_list").outerHeight();
                        var total_height=$("div.loan_product").length*$("div.loan_product").outerHeight();
                        var revise_H=($("div.hotloan_list").outerHeight())+($("div.loan_product").outerHeight()*5);
                        $(".more_hotcards").hide();
                        $("div.hotloan_list").css("height",'auto');
                        // $(".no_hotcards").show();

                        $(".no_hotcards").css({"display":"block"});
                        // if(list_H==total_height){
                        //     $(".no_hotcards").show();

                        // }else if(revise_H>total_height){
                        //     $("div.hotloan_list").css("height",total_height);
                        // }else if(revise_H<=total_height){
                        //     $("div.hotloan_list").css("height",revise_H);
                        // }
                    },1000);
                    num++;
                }
            }
        });
    })



</script>
<script></script>
</body>
</html>